package com.demo.apply.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 申请表
 * </p>
 *
 * @author 
 * @since 2021-11-10
 */
@TableName("t_d_apply")
public class TDApply extends Model<TDApply> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 创建人姓名
     */
    private String name;
    /**
     * 创建人登录名
     */
    @TableField("login_name")
    private String loginName;
    /**
     * 创建日期
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面写入数据库时格式化
    @JSONField(format="yyyy-MM-dd")//数据库导出页面时json格式化
    private Date createtime;
    /**
     * 申请名称
     */
    @TableField("apply_name")
    private String applyName;
    /**
     * 申请编号
     */
    @TableField("apply_serial")
    private String applySerial;
    /**
     * 单位数
     */
    private Integer count;
    /**
     * 钱数
     */
    private Double money;
    /**
     * 申请类型
     */
    private String type;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getApplyName() {
        return applyName;
    }

    public void setApplyName(String applyName) {
        this.applyName = applyName;
    }

    public String getApplySerial() {
        return applySerial;
    }

    public void setApplySerial(String applySerial) {
        this.applySerial = applySerial;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TDApply{" +
        ", id=" + id +
        ", name=" + name +
        ", loginName=" + loginName +
        ", createtime=" + createtime +
        ", applyName=" + applyName +
        ", applySerial=" + applySerial +
        ", count=" + count +
        ", money=" + money +
        ", type=" + type +
        "}";
    }
}
